<?php
/**
 * Known Issues:
 * 
 * 1. there is no filter for submit data, which may cause cross site javascript attack
 * 2. almost no comment for codes
 * 3. unit testing is omitted too
 * 4. Zend_Form implementation is in controller rather than handed by a model 
 * 
 */
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /**
     * Auto load initialization
     */
    protected function _initAutoload ()
    {
        $moduleLoader = new Zend_Application_Module_Autoloader(array('namespace' => '' , 'basePath' => APPLICATION_PATH));
        return $moduleLoader;
    }
    
    /**
     * View Helper initialization
     */
    function _initViewHelpers ()
    {
        $this->bootstrap('layout');
        $layout = $this->getResource('layout');
        $view = $layout->getView();
        $view->doctype('XHTML1_TRANSITIONAL');
        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
        $view->headTitle()->setSeparator(' / ');
        $view->headTitle('Resource Index');
        
        return $view;
    }
    
}